// KeyParser.h: interface for the CKeyParser class.
//
//////////////////////////////////////////////////////////////////////


#pragma once

#include "define.h"

#include "Parser.h"

class CKeyParser : public CParser
{	

public:

	CKeyParser();
	virtual ~CKeyParser();
	
	virtual void Reset();
	
	virtual int PacketParse( char* szMsg, size_t nLen, char* szPacket, size_t& nPacketSize );
	virtual int MakePacket( char* szMsg, size_t nLen, char* szPacket, size_t& nPacketSize );
	
	int PacketBind( char* szMsg, size_t nLen );

private:

	bool m_isBody;
	
	int m_nHeaderKey;
	
	size_t m_nTotalPacketSize;
	size_t m_nCurPacketPnt;	
	
	int m_nBodyKey;
	size_t m_nBodySize;		

};

